Skip to content

perf(semantic): reduce cloning CompactStrs when declaring references#4239

Closed
overlookmotel wants to merge 2 commits intomainfrom
07-12-perf_semantic_reduce_cloning_compactstr_s_when_declaring_references
Closed

perf(semantic): reduce cloning CompactStrs when declaring references#4239
overlookmotel wants to merge 2 commits intomainfrom
07-12-perf_semantic_reduce_cloning_compactstr_s_when_declaring_references

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 12, 2024

The hash map Entry API requires an owned key. Avoid using it so don't have to clone the reference name CompactStr unless the hashmap need an insertion.

Using Atom instead of CompactStr as hash map key (#3972) would be a better long-term solution, but that's not possible currently.

@graphite-app
Copy link
Contributor

graphite-app bot commented Jul 12, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @overlookmotel and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the A-semantic Area - Semantic label Jul 12, 2024
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 12, 2024

CodSpeed Performance Report

Merging #4239 will degrade performances by 3.2%

Comparing 07-12-perf_semantic_reduce_cloning_compactstr_s_when_declaring_references (b8f36f0) with main (c65198f)

Summary

❌ 1 regressions
✅ 31 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main 07-12-perf_semantic_reduce_cloning_compactstr_s_when_declaring_references Change
semantic[checker.ts] 117.1 ms 121 ms -3.2%

@overlookmotel overlookmotel reopened this Jul 12, 2024
@overlookmotel
Copy link
Member Author

Od dear. That didn't work.

@Boshen Boshen deleted the 07-12-perf_semantic_reduce_cloning_compactstr_s_when_declaring_references branch September 11, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant